<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.org/ui"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                template="../WEB-INF/includes/templates/templateAuthenticated.xhtml">
    <ui:define name="content">
        <style>

            .top-bar2{
                border: 1px solid #eeeeee;
            }
        </style>  
        <div id="main" style="min-height:600px;width: auto;max-width:1400px;min-width: 1200px;" >
            <br/>
            <br/>
            <br/>
            <br/>
            <h:form>
                <section  id="services" class="services" >
                    <div class="row" data-view="services">
                        <div class="small-11 large-12 small-centered columns">
                            <div class="row">
                                <div class="columns large-10 large-centered">
                                    <section  class="headline">
                                        <h2 style="text-align:left;">

                                            #{tittles['page.inmobRegistryValidator.tittle1']}
                                        </h2>
                                        <div align="center" >
                                            <table>
                                                <thead></thead>
                                                <tbody>
                                                    <tr>
                                                        <td>
                                                            #{labels['page.inmobRegistryValidator.chipnumber']}
                                                        </td>
                                                        <td>
                                                            #{inmobRegistryValidatorBean.chip.chipNumber}
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <h:outputLabel value="#{labels['page.inmobRegistryValidator.inmobregistrynumber']}" rendered="#{inmobRegistryValidatorBean.showAddress}" />

                                                        </td>
                                                        <td>
                                                            <h:outputText value="#{inmobRegistryValidatorBean.chip.inmobRegistryNumber}" rendered="#{inmobRegistryValidatorBean.showAddress}" />
                                                        </td>
                                                    </tr>
                                                </tbody>
                                            </table>
                                        </div>
                                    </section>
                                </div>
                            </div>
                        </div>
                    </div>
                </section>
            </h:form>
            <h:form id="validateMatInmob_form" rendered="#{!inmobRegistryValidatorBean.showAddress}" >
                <section  id="services1" class="services" >
                    <div class="row" data-view="services">
                        <div class="small-11 large-12 small-centered columns">
                            <div class="row">
                                <div class="columns large-10 large-centered">
                                    <section  class="headline">
                                        <div align="center" >
                                            <table>
                                                <thead><h5>#{labels['page.inmobRegistryValidator.inmobregistry']}</h5></thead>
                                                <br></br>
                                                <tbody>
                                                    <tr>
                                                        <td>
                                                            <h5 style="text-align:center;">
                                                            #{labels['page.inmobRegistryValidator.inmobregistrytextexplain']}
                                                            </h5>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <p:selectOneRadio label="#{labels['page.inmobRegistryValidator.inmobregistry']}" value="#{inmobRegistryValidatorBean.inmobRegistryNumber}" required="true" >
                                                                <f:selectItems value="#{inmobRegistryValidatorBean.inmobRegistryNumberSelectItemList}" var="qSelect" itemValue="#{qSelect.value}" itemLabel="#{qSelect.label}" itemDescription="#{qSelect.description}" ></f:selectItems>
                                                                <p:ajax event="change" update="validateMatInmob_form" ></p:ajax>
                                                            </p:selectOneRadio>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td align="right" >
                                                            <p:commandButton value="#{labels['page.general.continue']}" 
                                                                             action="#{inmobRegistryValidatorBean.validateInmobRegistry}" 
                                                                             id="registrySend" 
                                                                             style="font-family:'Open sans',sans-serif;font-size:18px;"
                                                                             ajax="false"></p:commandButton>
                                                            <p:commandButton 
                                                                value="#{labels['page.general.exit']}" 
                                                                action="index" 
                                                                id="goout" ajax="false" 
                                                                style="font-family:'Open sans',sans-serif;font-size:18px;"
                                                                immediate="true"
                                                                ></p:commandButton>
                                                        </td>
                                                    </tr>
                                                </tbody>
                                            </table>
                                        </div>
                                    </section>
                                </div>
                            </div>
                        </div>
                    </div>
                </section>
            </h:form>
            <h:form id="validatePrAddress_form" rendered="#{inmobRegistryValidatorBean.showAddress}">
                <section  id="services2" class="services" >
                    <div class="row" data-view="services">
                        <div class="small-11 large-12 small-centered columns">
                            <div class="row">
                                <div class="columns large-10 large-centered">
                                    <section  class="headline">
                                        <div align="center" >
                                            <table>
                                                <thead><h5>#{labels['page.inmobRegistryValidator.inmobaddress']}</h5></thead>
                                                <br></br>
                                                <tbody>
                                                    <tr>
                                                        <td>
                                                            <h5 style="text-align:center;">
                                                            #{labels['page.inmobRegistryValidator.inmobaddresstextexplain']}
                                                            </h5>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <p:selectOneRadio label="#{labels['page.inmobRegistryValidator.inmobaddress']}" value="#{inmobRegistryValidatorBean.inmobAddressNumber}" required="true" >
                                                                <f:selectItems value="#{inmobRegistryValidatorBean.inmobAddressNumberSelectItemList}" var="qSelect" itemValue="#{qSelect.value}" itemLabel="#{qSelect.label}" itemDescription="#{qSelect.description}" ></f:selectItems>
                                                                <p:ajax event="change" update="validatePrAddress_form" ></p:ajax>
                                                            </p:selectOneRadio>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td align="right" >
                                                            <p:commandButton value="#{labels['page.general.continue']}" 
                                                                             action="#{inmobRegistryValidatorBean.validateInmobAddress}" 
                                                                             id="addresSend" 
                                                                             style="font-family:'Open sans',sans-serif;font-size:18px;"
                                                                             ajax="false" ></p:commandButton>
                                                            <p:commandButton 
                                                                value="#{labels['page.general.exit']}" 
                                                                action="index" 
                                                                id="goout2" ajax="false" 
                                                                style="font-family:'Open sans',sans-serif;font-size:18px;"
                                                                immediate="true"
                                                                ></p:commandButton>
                                                        </td>
                                                    </tr>
                                                </tbody>
                                            </table>
                                        </div>
                                    </section>
                                </div>
                            </div>
                        </div>
                    </div>
                </section>                
            </h:form>
        </div>
    </ui:define>
</ui:composition>